-- GENERATED SPELL FOR [Mjordin Water Magus] --


function spell0_30632(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(15532,pUnit)
pUnit:RegisterEvent('Sorts_30632', 8338, 1)
end

function spell1_30632(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(9672,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30632', 7000, 1)
end

function spell2_30632(pUnit, Event) --@Summon Water Terror,Self--
pUnit:FullCastSpellOnTarget(7855,pUnit)
pUnit:RegisterEvent('Sorts_30632', 1000, 1)
end

function Sorts_30632(pUnit, Event)
local choix_sorts_30632 = math.random(0, 2)
if choix_sorts_30632 == 0 then
pUnit:RegisterEvent('spell0_30632', 1, 1)
end
if choix_sorts_30632 == 1 then
pUnit:RegisterEvent('spell1_30632', 1, 1)
end
if choix_sorts_30632 == 2 then
pUnit:RegisterEvent('spell2_30632', 1, 1)
end
end

function mob30632_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30632', math.random(1500, 3000), 1)
end

function mob30632_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30632_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30632_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30632, 1, 'mob30632_Action')
RegisterUnitEvent(30632, 2, 'mob30632_Leave')
RegisterUnitEvent(30632, 3, 'mob30632_Kill')
RegisterUnitEvent(30632, 4, 'mob30632_Die')
